/*
 * @Author: 吴世扬 18368095041@163.com
 * @Date: 2022-10-12 09:21:42
 * @LastEditors: 吴世扬 18368095041@163.com
 * @LastEditTime: 2022-10-12 09:54:43
 * @FilePath: /vue3-datav/src/views/template/IndexView/left1.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { reactive } from 'vue';
import { getLeft1Data as request } from '@/api/template';
export const left1Model = reactive({
    isLoading: false,
    columns: [
        {
            label: '标题',
            field: 'title'
        },
        {
            label: '内容',
            field: 'content'
        },
        {
            label: '处理',
            field: 'excute'
        }
    ],
    dataList: [
        {
            title: '标题',
            content: '内容',
            excute: '处理'
        }
    ]
});
export const getLeft1Data = () => {
    if (left1Model.isLoading) return false;
    left1Model.isLoading = true;
    return request()
        .then((res) => {
            const { data } = res;
            left1Model.dataList = data;
            return res;
        })
        .finally(() => {
            left1Model.isLoading = false;
        });
};
